package com.datapulse.demo4;

import com.ruoyi.auth.properties.AuthProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DemoController1 {


    @Autowired
    AuthProperties authProperties;

    @GetMapping("/demo")
    public String home() {
        return "index"; // 返回视图名称，Thymeleaf会自动查找index.html
    }



    @GetMapping("/api/login")
    @ResponseBody
    public String login(){
        return authProperties.getLoginPage();
    }
}
